#include "icm20602.h"
#include "headfile.h"
#include "MySPI.h"


#define DELAY_MS(ms)    systick_delay_ms(ms)
uint8 icm20602_Init(void)
{
  
//  icm20602_self3_check();
  icm20602_init_spi();		
  return 0;
}

XYZ Accel,Gyro;
void icm20602_Read()
{
	get_icm20602_accdata_spi();
	get_icm20602_gyro_spi();
	Accel.X=icm_acc_x;
	Accel.Y=icm_acc_y;
	Accel.Z=icm_acc_z;
	Gyro.X=icm_gyro_x;
	Gyro.Y=icm_gyro_y;
	Gyro.Z=icm_gyro_z;
}